package com.xiaohao.student_course.controller;

import com.xiaohao.student_course.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created with IntelliJ IDEA.
 *
 * @author 小浩
 * @date 2018-12-17 23:40
 * @package com.xiaohao.student_course.controller
 * @description
 */
@Controller
@RequestMapping("/teacher")
public class TeacherController {
    @Autowired
    private TeacherService teacherService;
    @RequestMapping("/query")
    public String getAll(Model model){
        model.addAttribute("teacherQueryPage",teacherService.getAll());
        return "teacher-query";
    }
}
